import request from '@/utils/request'

// 获取角色列表
export const getRoleListAPI = params => request.get('/sys/role', { params })

// 添加角色
export const addRoleAPI = data => request.post('/sys/role', data)

// 获取角色详情
export const getRoleDetailAPI = id => request.get(`/sys/role/${id}`)

// 编辑角色详情
export const editROleAPI = data => request.put(`/sys/role/${data.id}`, data)

// 删除
export const delRoleAPI = id => request.delete(`/sys/role/${id}`)

// 分配权限
export const assignPermission = data => request.put('/sys/role/assignPrem', data)

